import request from '@/sheep/request';

export default {
  list: (params) =>
    request({
      url: '/h5/release/list',
      method: 'GET',
      params,
      custom: {
        auth: true,
      },
    }),

  add: (data) =>
    request({
      url: '/h5/release/add',
      method: 'POST',
      data,
      custom: {
        auth: true,
        showLoading: true,
        loadingMsg: '发布中...',
      },
    }),

  getById: (id) =>
    request({
      url: '/h5/release/getById',
      method: 'GET',
      params: { id },
      custom: {
        auth: true,
      },
    }),

  edit: (data) =>
    request({
      url: '/h5/release/edit',
      method: 'POST',
      data,
      custom: {
        auth: true,
        showLoading: true,
        loadingMsg: '更新中...',
      },
    }),

  remove: (id) =>
    request({
      url: '/h5/release/remove',
      method: 'GET',
      params: { id },
      custom: {
        auth: true,
        showLoading: true,
        loadingMsg: '删除中...',
      },
    }),
}; 